<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@ taglib prefix="sb" uri="/struts-bootstrap-tags"%>

<div class="body">
	<div class="row">
		<div class="col-lg-10 col-lg-offset-1">
			<div class="title">
				<h2>
					<s:text name="page.heading.addnew" />
				</h2>
			</div>
		</div>
		<div class="col-lg-10 col-lg-offset-1">
			<div>
				<s:actionerror />
				<s:form action="save" namespace="/timer" method="post" theme="simple">
					<s:hidden name="mode" />
					<s:hidden name="timerSetting.timer.id" />
					<fieldset>
						<div class="span7">

								<div class="control-group">
									<s:text name="timer.label" />
									<s:textfield name="timerSetting.timer.name"
										cssClass="form-control"
										placeholder="%{getText('timer.label.placeholder')}"
										required="true" />
								</div>
								<div class="control-group">
									<s:text name="timer.switch" />
									<s:select name="timer.switchId" list="switchList" listKey="id"
										listValue="name" value="timerSetting.switches.id" />
									<%-- <s:select name="timer.switchId" list="switchList"
												listKey="id" listValue="name"
												value="timerSetting.switches.id" /> --%>
								</div>
								<div class="control-group">
									<s:text name="timer.time" />
									<table>
										<tr>
											<td><s:select list="time_hour" name="selected_hour"
													id="timename" value="hour" /></td>
											<td><s:select name="selected_min" list="time_min"
													value="min" /></td>
										</tr>
									</table>
								</div>
								<%-- <div class="control-group">
											<s:text name="timer.time" />
											<table>
												<tr>
													<td><s:select list="time_hour" name="selectedHour"
															id="thour" value="hour" /></td>
													<td><s:select name="timer.trigerTime" list="time_min"
															value="timerSetting.timer.getMin()" /></td>
												</tr>
											</table></div> --%>


								<%--<s:iterator value="timerSetting.schedule">
											<label class="checkbox-inline">
												 <input type="checkbox" name="selecteddays"
													value="<s:property value='%{dayOf}'/>" checked="checked" />
													<s:set var="day" value="dayOf" />
													<s:property value="#day"/> 
												    <s:property value="@com.aios.entity.unit.DayName@getMap().get({#day})"/>
												</label>	
										</s:iterator> --%>
								<div class="control-group">
									<s:text name="timer.repeat" />
									<s:checkboxlist list="weekList" name="selectedDays"
										value="dayList" labelposition="inline" />
									<!-- <s:select label="Select User Type" cssClass="form-control" name="systemUser.userType" headerKey="1" headerValue="-- Please Select --" list="@com.aios.entity.unit.UserType@values()"></s:select> -->
								</div>
								<div class="control-group">
									<%-- <s:text name="timer.change" /> --%>
									<s:radio name="switchSetting" label="Type" list="settingList"
										value="timerSetting.timer.switchSetting" />
								</div>
								<div class="control-group">
									<s:checkbox name="timer.status"
										value="timerSetting.timer.status"></s:checkbox>
									<%-- <s:if test="timerSetting.timer.status==0">
										<s:checkbox name="timer.status" value="true" fieldValue="0"></s:checkbox>
										 </s:if>
										 <s:else>
										 <s:checkbox name="timer.status" value="false" fieldValue="1"></s:checkbox>
										 </s:else> --%>
								</div>
							
						</div>

					</fieldset>
				</s:form>
			</div>
		</div>
	</div>
</div>
</div>


